package com.sjd.web.controller.common;

import com.sjd.common.core.controller.BaseController;
import com.sjd.common.core.domain.AjaxResult;
import com.sjd.provider.FileOssServerProvider;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * oss授权，后台服务器签名授权==>web直传
 *
 * @author maple
 */
@RestController
@RequestMapping("/oss/auth")
@AllArgsConstructor
public class OssAuthController extends BaseController {
    private final FileOssServerProvider fileOssServerProvider;

    @GetMapping("/{provider}")
    public AjaxResult ossAuthByProvider(@PathVariable(name = "provider") String provider) {
        return fileOssServerProvider.ossAuthByProvider(provider);
    }
}
